#include "../Resource.h"
#include <windows.h>
#include <ole2.h>
#include "App.h"

namespace App {

void Init( HINSTANCE hInstance, LPTSTR lpCmdLine, int nCmdShow ) {
	::OleInitialize(0);
}

void Exit( int code ) {
	PostQuitMessage( code );
}
int MainLoop(HWND w) {
	MSG msg = {0};
	//HACCEL  hAccelTable = Config::CreateAccel(); //LoadAccelerators(instance_, MAKEINTRESOURCE(IDC_MYEDITOR));
	while ( GetMessage( &msg, NULL, 0, 0 ) ) {
		if (!TranslateAccelerator(w, 0, &msg))
		{
			TranslateMessage( &msg );
			DispatchMessage( &msg );
		}
	}
	::OleUninitialize();
	return ( int ) msg.wParam;
}
};
